package com.situ.mall.pojo.vo;

import com.situ.mall.util.ImageServerUtil;

import java.math.BigDecimal;

public class CartVO {
    private Integer id;
    private Integer productId;
    private String name;
    private String mainImage;// main_image
    private BigDecimal price;
    private Integer quantity;
    private Integer checked;

    // mainImageUrl
    public String getMainImageUrl() {
        return ImageServerUtil.getImageUrl(mainImage);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMainImage() {
        return mainImage;
    }

    public void setMainImage(String mainImage) {
        this.mainImage = mainImage;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getChecked() {
        return checked;
    }

    public void setChecked(Integer checked) {
        this.checked = checked;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    @Override
    public String toString() {
        return "CartVO{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", mainImage='" + mainImage + '\'' +
                ", price=" + price +
                ", quantity=" + quantity +
                ", checked=" + checked +
                '}';
    }
}
